package com.uzai.console.service.feign;

import com.uzai.console.common.UzaiRespVo;
import com.uzai.console.dto.feign.tborder.*;
import com.uzai.console.service.feign.impl.TbOrderFeignFallbackFactory;
import com.uzai.console.vo.tb.tborder.feign.TbOrderBindVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * @Auther: jianghan
 * @Date: 2021/11/24 16:22
 * @Description:
 */
@Component
@FeignClient(value = "uzai-order-server", fallbackFactory = TbOrderFeignFallbackFactory.class)
public interface TbOrderFeignService {

    /**
     * 淘宝订单确认收货
     * @author jitwxs
     * @date 2021/11/29 10:25
     * @param tbOrderSettledDto
     * @return com.uzai.console.common.UzaiRespVo<java.lang.Boolean>
     */
    @PostMapping("/settled/tb/order")
    UzaiRespVo<Object> settled(@RequestBody TbOrderSettledDto tbOrderSettledDto);

    /**
     * 淘宝订单解冻
     * @author jitwxs
     * @date 2021/11/29 10:26
     * @param tbOrderUnfreezeDto
     * @return com.uzai.console.common.UzaiRespVo<java.lang.Boolean>
     */
    @PostMapping("/unfreeze/tb/sync")
    UzaiRespVo<Object> unfreeze(@RequestBody TbOrderUnfreezeDto tbOrderUnfreezeDto);

    /**
     * 淘宝订单解绑用户
     * @author jitwxs
     * @date 2021/11/29 10:26
     * @param tbOrderUnbindDto
     * @return com.uzai.console.common.UzaiRespVo<java.lang.Boolean>
     */
    @PostMapping("/unbind/tb/sync")
    UzaiRespVo<Object> unbind(@RequestBody TbOrderUnbindDto tbOrderUnbindDto);

    /**
     * 淘宝订单绑定用户
     * @author jitwxs
     * @date 2021/11/29 10:26
     * @param tbOrderBindDto
     * @return com.uzai.console.common.UzaiRespVo<java.lang.Boolean>
     */
    @PostMapping("/bind/tb/async")
    UzaiRespVo<Object> bind(@RequestBody TbOrderBindDto tbOrderBindDto);

    /**
     * 淘宝订单拉取接口
     * @author jitwxs
     * @date 2021/11/29 10:26
     * @param tbOrderPullDto
     * @return com.uzai.console.common.UzaiRespVo<java.lang.Boolean>
     */
    @PostMapping("/pull/tb/orderByToken")
    UzaiRespVo<Boolean> pull(@RequestBody TbOrderPullDto tbOrderPullDto);

    /**
     * 淘宝维权订单上传
     * @author jitwxs
     * @date 2021/11/29 10:26
     * @param tbRefundOrderUploadDto
     * @return com.uzai.console.common.UzaiRespVo<java.lang.Boolean>
     */
    @PostMapping("/push/tb/refundorder")
    UzaiRespVo<Boolean> refundorderUpload(@RequestBody TbRefundOrderUploadDto tbRefundOrderUploadDto);

    /**
     * 淘宝通过api拉取订单
     * @author jitwxs
     * @date 2021/11/29 10:26
     * @param tbOrderDownloadDto
     * @return com.uzai.console.common.UzaiRespVo<java.lang.Boolean>
     */
    @PostMapping("/tb/order/download")
    UzaiRespVo<Boolean> tbOrderDownload(@RequestBody TbOrderDownloadDto tbOrderDownloadDto);

    /**
     * 淘宝通过api拉取维权订单
     * @author jitwxs
     * @date 2021/11/29 10:26
     * @param tbOrderRefundDownloadDto
     * @return com.uzai.console.common.UzaiRespVo<java.lang.Boolean>
     */
    @PostMapping("/tb/refundorder/download")
    UzaiRespVo<Boolean> tbOrderRefundDownload(@RequestBody TbOrderRefundDownloadDto tbOrderRefundDownloadDto);


}
